//
//  ZZZXGoodsAnalysisCell.m
//  新项目
//
//  Created by liGordon on 17/3/8.
//  Copyright © 2017年 刘耀宗. All rights reserved.
//

#import "ZZZXGoodsAnalysisCell.h"
@interface ZZZXGoodsAnalysisCell ()
@property (weak, nonatomic) IBOutlet UILabel *titleLab;
@property (weak, nonatomic) IBOutlet UILabel *numLab;
@property (weak, nonatomic) IBOutlet UILabel *danJiaLab;
@property (weak, nonatomic) IBOutlet UILabel *shiYongLab;

@end
@implementation ZZZXGoodsAnalysisCell

- (void)awakeFromNib {
    [super awakeFromNib];

}
- (IBAction)moreBtnClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(clickDetail)]) {
        [self.delegate clickDetail];
    }
    
}
-(void)setDic:(NSDictionary *)dic
{
    _dic=dic;
    id PartsName=dic[@"PartsName"];
    if (PartsName==nil||[[PartsName class] isSubclassOfClass:[NSNull class]]) {
        
    }else
    {
        self.titleLab.text=dic[@"PartsName"];
    
    }
    
    self.numLab.text=[NSString stringWithFormat:@"%ld个",[dic[@"SumNumber"] integerValue]];
    [self.numLab sizeToFit];
    self.danJiaLab.text=[NSString stringWithFormat:@"%.2lf元/条",[dic[@"AvgMoney"] floatValue]];
    [self.danJiaLab sizeToFit];
    self.shiYongLab.text=[NSString stringWithFormat:@"适用于:%@",dic[@"CarModelName"]];
    [self.shiYongLab sizeToFit];
    

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
